<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>序列化表单提交</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <script type="text/javascript" src="../conmmJs/jquery-1.11.1.min.js"></script>
    <!--<script type="text/javascript">-->
        <!--var v = "";-->
        <!--$(document).ready(function(){-->
            <!--$("button").click(function(){-->
                <!--$("input[name='checkbox']:checkbox:checked").each(function(){-->
                    <!--v = v + $(this).parent().val();-->
                <!--});-->
                <!--console.log(v);-->
                <!--v = "";-->
            <!--});-->
        <!--});-->
    <!--</script>-->

    <!--<script type="text/javascript">-->
        <!--var v = "";-->
        <!--$(document).ready(function(){-->
            <!--$("button").click(function(){-->
                <!--$("input[name='checkbox']:checkbox:checked").each(function(){-->
                    <!--v = v + $(this).parent().children("input[name='FirstName']").val();-->
                <!--});-->
                <!--console.log(v);-->
                <!--v = "";-->
            <!--});-->
        <!--});-->
    <!--</script>-->

    <script type="text/javascript">
        var v = "";
        var libIds=[];
        $(document).ready(function(){
            $("button").click(function(){
                libIds=[];
                $("input[name='checkbox']:checkbox:checked").each(function(){
                    v = $(this).parent().serializeArray();
                    libIds.push(v);
                });
                console.log(libIds)
                v = "";
            });
        });
    </script>



</head>

<body>
<form id="form1" action="">
    <span>2017-09-26  14：57</span> 上门回收<input type="checkbox" name="checkbox" /><br/>
    <div>三星 估价单：￥800</div>

    <div>First name: <input type="text" name="FirstName" value="Bill" /></div><br />
    Last name: <input type="text" name="LastName" value="Gates" /><br />
    <p></p>

</form>


<form id="form2" action="">
   <span>2017-09-26  14：57</span> 上门回收<input type="checkbox" name="checkbox" /><br/>
    <div>iphone6 估价单：￥1210</div>
    ime串号: <input type="text" name="FirstName" value="云计算" /><br />
    Last name: <input type="text" name="LastName" value="试试" /><br />
    <p></p>
</form>


<form id="form3" action="">
    <span>2017-09-26  14：57</span> 上门回收<input type="checkbox" name="checkbox" /><br/>
    <div>魅族 估价单：￥410</div>

    First name: <input type="text" name="FirstName" value="不一样" /><br />
    Last name: <input type="text" name="LastName" value="这是" /><br />
    <p></p>

</form>
<button>序列化表单值</button>
<div></div>
</body>
</html>

<body>
<form id="myform">
    姓名：<input type="text" name="name" /><br><br>
    年龄： <input type="text" name="year" /><br><br>
</form>

<input type="button" id="ajaxBtn" value="提交" /><br>

</body>
</html>
<script>

    $(function() {
        $("#ajaxBtn").click(function() {
            var params2 = $("#myform").serializeArray();
            console.log(params2);  //[Object, Object, Object]
        })
    })
</script>